<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组</title>
</head>
<body>

</body>
<script language="JavaScript">
    var total = 0;
    var sum = new Array(1000,345,567,1001,1002,234);  // 数组

    for(i=0;i<sum.length;i++) {
        if(sum[i] >= 1000){
            total += sum[i];
        } else {
            continue
        }
    }
    document.write(total);

</script>
</html>